﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
  <title>hCard 2 - Top level optional multiple occurrence test</title>
  
 <!-- This will be replace with one CSS file and one JavaScipt file -->
  <link rel="stylesheet" href="../css/uftestsuite.css" type="text/css" />
  <link rel="stylesheet" href="../../../testrunner/css/testrunner.css" type="text/css" />
  
  <script type="text/javascript" src="../../testrunner/javascript/prototype-1.6.0.2.js"></script> 
  <script type="text/javascript" src="../../testrunner/javascript/beautify.js"></script> 
  <script type="text/javascript" src="../../testrunner/javascript/sumo/microformat.js"></script>
  <script type="application/javascript;version=1.7" src="http://svn.mozilla.org/labs/operator/chrome/content/Microformats/Microformats.js"></script>
  <script type="text/javascript" src="../../testrunner/javascript/shiv/microformats-shiv.js"></script>
  <script type="text/javascript" src="../../testrunner/javascript/shiv/microformats-definition.js"></script>  
  <script type="text/javascript" src="../../testrunner/javascript/testrunner.js"></script>
   
   
</head>
<body>
    
    <div class="test-fixture">
    
    <p>
    <a href="../"><img border="0" id="testsuite-image" alt="Microformats test suite" src="../images/testsuite.gif" /></a><br />
    </p>
    
    <h1 class="summary">hCard 2 - multiple occurrence test</h1>
    <p class="description">This page was design to test that values of a hcard which are can have multiple occurrences are parsed correctly.</p>
    <p>From: <a href="default.htm"><span class="format">hCard</span> test suite 1.0</a></p>
    <p class="author vcard">
        Author: <a class="url fn" href="http://www.glennjones.net/">Glenn Jones</a> 
    </p>
    <!--
    <p>Output examples: 
    <ul>
    <li class="output"><a class="url" href="hcard1.js"><span class="type">JSON</span></a></li>
    <li class="output"><a class="url" href="hcard1.xml"><span class="type">XML</span></a></li>
    </ul>
    </p>
    -->
    
    <input id="unittestbutton" type="button" onclick="microformatsTestRunner.displayTestOptionForm()" value="Unit Test Runner"/>

    
    <p>Tests:</p>
    <table id="assetTable" cellpadding="0" cellspacing="0">
    <thead>
        <tr>
            <th>Test</th>
            <th>Result</th>
            <th>Comment</th>
        </tr>
    </thead>
    <tbody>
        <!-- Used HasProperty instead 
        <tr class="assert">
            <td class="test">vcard[0].adr[1].street-address[0]</td>
            <td class="result">IsEqualTo("West Street")</td>
            <td class="comment">The adr (address) is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].email[1]</td>
            <td class="result">IsEqualTo("john.doe@webfeetmedia.com")</td>
            <td class="comment">The class is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].org[1].organization-name</td>
            <td class="result">IsEqualTo("Web Feet Media Ltd")</td>
            <td class="comment">The org is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].tel[1].value</td>
            <td class="result">IsEqualTo("+1 415 555 200")</td>
            <td class="comment">The tel is a optional multiple value</td>
        </tr>
        -->
        
            
        <tr class="assert">
            <td class="test">vcard[0].adr[1]</td>
            <td class="result">HasProperty(true)</td>
            <td class="comment">The adr (address) is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].email[1]</td>
            <td class="result">HasProperty(true)</td>
            <td class="comment">The class is a optional multiple value</td>
        </tr>
         <tr class="assert">
            <td class="test">vcard[0].org[1]</td>
            <td class="result">HasProperty(true)</td>
            <td class="comment">The org is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].tel[1]</td>
            <td class="result">HasProperty(true)</td>
            <td class="comment">The tel is a optional multiple value</td>
        </tr>
        
         <tr class="assert">
            <td class="test">vcard[0].agent[1]</td>
            <td class="result">IsEqualTo("Dave Doe")</td>
            <td class="comment">The agent is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].category[1].tag</td>
            <td class="result">IsEqualTo("development")</td>
            <td class="comment">The category is a optional multiple value</td>
        </tr>

        <tr class="assert">
            <td class="test">vcard[0].key[0]</td>
            <td class="result">IsEqualTo("hd02$Gfu*d%dh87KTa2=23934532479")</td>
            <td class="comment">The key is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].label[1]</td>
            <td class="result">IsEqualTo("West Street, Brighton, United Kingdom")</td>
            <td class="comment">The label is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].logo[1]</td>
            <td class="result">IsEqualTo("http://www.ufxtract.com/testsuite/images/logo.gif")</td>
            <td class="comment">The logo is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].mailer[1]</td>
            <td class="result">IsEqualTo("Outlook 2007")</td>
            <td class="comment">The mailer is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].nickname[1]</td>
            <td class="result">IsEqualTo("Lost boy")</td>
            <td class="comment">The nickname is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].note[1]</td>
            <td class="result">IsEqualTo("It can be a real problem booking a hotel room with the name John Doe.")</td>
            <td class="comment">The note is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].photo[0]</td>
            <td class="result">IsEqualTo("http://www.ufxtract.com/testsuite/images/photo.gif")</td>
            <td class="comment">The photo is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].sound[0]</td>
            <td class="result">IsEqualTo("Pronunciation of my name")</td>
            <td class="comment">The sound is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].title[1]</td>
            <td class="result">IsEqualTo("Owner")</td>
            <td class="comment">The title is a optional multiple value</td>
        </tr>
        <tr class="assert">
            <td class="test">vcard[0].url[1]</td>
            <td class="result">IsEqualTo("http://www.webfeetmedia.com/")</td>
            <td class="comment">The url is a optional multiple value</td>
        </tr>
    </tbody>
    </table> 
    
    
    <p>History:</p>
    <ul>
	    <li class="history vevent">
	        <span class="summary">Created</span>: <abbr class="dtstart" title="2008-04-08">8 April 2008</abbr> 
	        <span class="description">by Glenn Jones</span>
	    </li>
	    
	    <li class="history vevent">
	        <span class="summary">Updated</span>: <abbr class="dtstart" title="2008-05-07">7 May 2008</abbr> 
	        <span class="description">by Glenn Jones - Changed incorrect test values for logo, photo and key properties</span>
	    </li>
	    
    	<li class="history vevent">
	        <span class="summary">Updated</span>: <abbr class="dtstart" title="2008-06-08">19 July 2010</abbr> 
	        <span class="description">by Glenn Jones - Changed category assert</span>
	    </li>
    </ul>
    
    
    
    </div>
  
    <div id="uf">
        <div class="vcard">
            <!-- This may not be the best semantic use of HTML element -->
            <div class="fn n"><span class="given-name">John</span> <span class="family-name">Doe</span></div>
            <a class="sound" href="http://www.madgex.com/johndoe.mpeg">Pronunciation of my name</a>
            <div><img class="photo" width="80" height="100" src="../images/photo.gif" alt="Photo of John Doe" /></div>
            <p>Nicknames:</p>
            <ul>
                <li class="nickname">Man with no name</li>
                <li class="nickname">Lost boy</li>
            </ul>
            <p>About:</p>
            <p class="note">John Doe is one of those names you always have issues with.</p>
            <p class="note">It can be a real problem booking a hotel room with the name John Doe.</p>
            <p>Companies:</p>
            
            <div>
                <img class="logo" width="80" height="100" src="../images/logo.gif" alt="Madgex company logo" />
                <img class="logo" width="80" height="100" src="../images/logo.gif" alt="Web Feet Media company logo" />
            </div>

            <ul>
                <li><a class="url org" href="http://www.madgex.com/">Madgex</a> <span class="title">Creative Director</span></li>
                <li><a class="url org" href="http://www.webfeetmedia.com/">Web Feet Media Ltd</a> <span class="title">Owner</span></li>
            </ul>
            
            
            <p>Tags: 
            <a rel="tag" class="category" href="http://en.wikipedia.org/wiki/design">design</a>, 
            <a rel="tag" class="category" href="http://en.wikipedia.org/wiki/development">development</a> and
            <a rel="tag" class="category" href="http://en.wikipedia.org/wiki/web">web</a>
            </p>
            
            <p>Phone numbers:</p>
            <ul>
                <li class="tel">
                    <span class="type">Work</span> (<span class="type">pref</span>erred):
                    <span class="value">+1 415 555 100</span>
                </li>
                <li class="tel"><span class="type">Home</span>: <span class="value">+1 415 555 200</span></li>
                <li class="tel"><span class="type">Postal</span>: <span class="value">+1 415 555 300</span></li>
            </ul>
            
            <p>Emails:</p>
            <ul>
                <li><a class="email" href="mailto:john.doe@madgex.com">John Doe at Madgex</a></li>
                <li><a class="email" href="mailto:john.doe@webfeetmedia.com">John Doe at Web Feet Media</a></li>
            </ul>
            <p>John Doe uses <span class="mailer">PigeonMail 2.1</span> or <span class="mailer">Outlook 2007</span> for email.</p>
            
            <p>Addresses:</p>
            <ul>
                <li class="adr">
                    <span class="type">Work</span>: 
                    <div class="label">
                        <span class="street-address">North Street</span>, 
                        <span class="locality">Brighton</span>, 
                        <span class="country-name">United Kingdom</span>
                    </div>
                </li>
                <li class="adr">
                    <span class="type">Home</span>: 
                    <div class="label">
                        <span class="street-address">West Street</span>, 
                        <span class="locality">Brighton</span>, 
                        <span class="country-name">United Kingdom</span>
                    </div>
                </li>
            </ul>
            
           
            <p>In emergency contact: <span class="agent">Jane Doe</span> or <span class="agent">Dave Doe</span>.</p>
           
            <p>Key: <span class="key">hd02$Gfu*d%dh87KTa2=23934532479</span></p>
            
        </div>
    </div>
    
    <p>
        <a rel="license" href="../license.txt">Some rights reserved</a>
    </p>
      
</body>

</html>